package com.microlecture.entity;

import java.util.Date;

public class CookbookDiscuss {
    private Integer id;

    private Integer cookbookid;

    private Integer userid;

    private String content;

    private Date discusstime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCookbookid() {
        return cookbookid;
    }

    public void setCookbookid(Integer cookbookid) {
        this.cookbookid = cookbookid;
    }

    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    public Date getDiscusstime() {
        return discusstime;
    }

    public void setDiscusstime(Date discusstime) {
        this.discusstime = discusstime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", cookbookid=").append(cookbookid);
        sb.append(", userid=").append(userid);
        sb.append(", content=").append(content);
        sb.append(", discusstime=").append(discusstime);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CookbookDiscuss other = (CookbookDiscuss) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCookbookid() == null ? other.getCookbookid() == null : this.getCookbookid().equals(other.getCookbookid()))
            && (this.getUserid() == null ? other.getUserid() == null : this.getUserid().equals(other.getUserid()))
            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
            && (this.getDiscusstime() == null ? other.getDiscusstime() == null : this.getDiscusstime().equals(other.getDiscusstime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCookbookid() == null) ? 0 : getCookbookid().hashCode());
        result = prime * result + ((getUserid() == null) ? 0 : getUserid().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        result = prime * result + ((getDiscusstime() == null) ? 0 : getDiscusstime().hashCode());
        return result;
    }
}